'''
LastEditors: lf
Date: 2020-12-28 22:38:10
LastEditTime: 2020-12-29 22:06:55
FilePath: \023异常处理\异常处理.py
'''
import urllib.error
import urllib.request

'''
description: 访问不存在的链接
param {*}
return {*}
'''

url = "http://sadsadsadasd.com"
req = urllib.request.Request(url)
try:
    urllib.request.urlopen(req)
except urllib.error.URLError as e:
        print(e.reason)


